<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <link href="https://cdn.bootcss.com/twitter-bootstrap/3.0.1/css/bootstrap.min.css" rel="stylesheet">
    </head>
    <body>


        <div class="container">
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <form id="form" action="/prefund/report" method="post">
                    <h1 class="text-center">
                        客户预存款报表
                    </h1>

                        <div class="form-group">
                            <div class="col-sm-2">
                                <button type="button" class="btn btn-success btn-success"
                                        value="" style="background-color:darkgrey;font-size: large"
                                        onclick="history.back()"
                                >返回</button>
                            </div>
                        </div>
                    <h3 class="text-right text-success">
                        欢迎您:管理员
                        <#--<@shiro.principal property="name" />-->
                    </h3>

                        <div class="form-group">
                            <div class="col-sm-2">
                                <button type="button" class="btn btn-default btn-block"
                                        value="" style="background-color: cornflowerblue;font-size: large"
                                >筛选查询</button>
                            </div>
                        </div>

                    <div class="col-sm-offset-11 col-sm-0">
                        <button type="submit" class="btn btn-success"
                                <#--onclick="accountSubmit()"-->
                        style="margin-bottom: 10px">查询</button>
                    </div>

                    <div class="col-md-4 column">
                        <label for="pid" class="col-sm-2 control-label">客户名称</label>
                        <div class="col-sm-10">
                            <select name="pid" class="form-control" id="pid">
                                <option value="0">请选择客户</option>
                                <#if clientList?exists>
                                    <#list clientList as client>
                                        <option value="${client.pid?if_exists}"
                                                <#--<#if client.pid==form.pid>selected</#if>-->
                                        >${client.clientName}</option>
                                    <#--<option value="${model.id?if_exists}" <#if menu.parentId== model.id>selected</#if>>${model.name}</option>-->
                                    </#list>
                                </#if>
                            </select>
                        </div>
                    </div>


                    <div class="col-md-4 column">
                        <label for="startDate" class="col-sm-2 control-label">开始日期</label>
                        <div class="col-sm-10">
                            <input type="date" class="form-control" id="startDate"
                                   name="startDate"
                                    <#if  (form.startDate??)>
                                        value="${form.startDate?string('yyyy-MM-dd')}"
                                    </#if>
                                   />
                        </div>
                    </div>
                    <div class="col-md-4 column">
                        <label for="endDate" class="col-sm-2 control-label">结束日期</label>
                        <div class="col-sm-10">
                            <input type="date" class="form-control" id="endDate"
                                   name="endDate"
                                    <#if  (form.endDate??)>
                                value="${form.endDate?string('yyyy-MM-dd')}"
                                   </#if>/>
                        </div>
                    </div>
                        <div class="col-md-4 column">

                        </div>

                    </form>

                </div>
            </div>
        </div>


        <div class="container">
            <div class="row clearfix">
                <div class="col-md-12 column">

                    <div class="form-group">
                        <div class="col-sm-2">
                            <button type="button" class="btn btn-default btn-block"
                                    value="" style="background-color: cornflowerblue;font-size: large"
                            >数据列表</button>
                        </div>
                    </div>

        <table class="table">
            <thead>
            <tr>
                <th>客户名称</th>
                <th>使用合计</th>
                <th>总收款金额</th>
                <th>可用金额</th>
                <th>期初剩余款</th>
                <th>本期使用</th>
                <th>本期新存</th>
                <th>期末剩余</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <#--                    c:forEach items='${pageInfo.list}'  var='trip'-->
            <#list pageInfo.list as prefund>
                <tr class="info">
                    <td>${prefund.clientName}</td>
                    <td>${prefund.totalUsed!}</td>
                    <td>${prefund.totalMoney!}</td>
                    <td>${prefund.usedBalance!}</td>
                    <td>${prefund.periodStartBalane!}</td>
                    <td>${prefund.periodUsed!}</td>
                    <td>${prefund.periodSave!}</td>
                    <td>${prefund.periodEndBalance!}</td>
                    <td>

                        <button type="button" class="btn btn-info btn-link"
                                onclick="location.href='/prefund/order/list?pid=${prefund.pid}'">预存款使用记录</button>

                    </td>

                </tr>
            </#list>

            </tbody>
        </table>
        <ul class="pagination" style="float: right">


            <#if pageInfo.hasPreviousPage >
                <li>
                    <a href="javascript:;" onclick="location.href='/prefund/report?index=1'">首页</a>
                </li>

                <li>
                    <a href="javascript:;" onclick="location.href='/prefund/report?index=${pageInfo.prePage}'">上一页</a>
                </li>
            </#if>


            <#if pageInfo.pageNum lt pageInfo.pages >
                <li>
                    <a href="javascript:;" onclick="location.href='/prefund/report?index=${pageInfo.nextPage}'">下一页</a>
                </li>
                <li>
                    <a href="javascript:;" onclick="location.href='/prefund/report?index=${pageInfo.pages}'">尾页</a>
                </li>
            </#if>
        </ul>

                </div>
            </div>
        </div>


        <script src="/js/jquery-1.8.0.min.js" ></script>
        <script>
        </script>
    </body>
</html>